/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package View.Model;

import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author ANA
 */
public class Project {
    
    private String projectNome, projectFolder; // Informações Projeto
    private String nomeServer, passwordServer, idServer, portaServer; // Informações ServidorBroker
    private String nomeProt, userProt, passwordProt; // Informações Protocolo
    
    public Project(String projectNome, String projectFolder) { 
        this.projectNome = String.format("<<Project>> %s",projectNome);
        this.projectFolder = projectFolder; 
        this.nomeProt = "<<Protocol>> MQTT";
        this.nomeServer = "<<Server>> Web";
    }

    public Project(String projectNome, String projectFolder, String nomeServer, String passwordServer, String idServer, String portaServer, String nomeProt,String userProt,String passwordProt) {
        this.projectNome = projectNome;
        this.projectFolder = projectFolder;
        
        this.nomeServer = nomeServer;
        this.passwordServer = passwordServer;
        this.idServer = idServer;
        this.portaServer = portaServer;
        
        this.nomeProt = nomeProt;
        this.userProt = userProt;
        this.passwordProt = passwordProt;
    }

    public String getProjectNome() {
        return projectNome;
    }

    public void setProjectNome(String projectNome) {
        this.projectNome = projectNome;
    }

    public String getProjectFolder() {
        return projectFolder;
    }

    public void setProjectFolder(String projectFolder) {
        this.projectFolder = projectFolder;
    }

    public String getNomeServer() {
        return nomeServer;
    }

    public void setNomeServer(String nomeServer) {
        this.nomeServer = nomeServer;
    }

    public String getPasswordServer() {
        return passwordServer;
    }

    public void setPasswordServer(String passwordServer) {
        this.passwordServer = passwordServer;
    }

    public String getIdServer() {
        return idServer;
    }

    public void setIdServer(String idServer) {
        this.idServer = idServer;
    }

    public String getPortaServer() {
        return portaServer;
    }

    public void setPortaServer(String portaServer) {
        this.portaServer = portaServer;
    }

    public String getNomeProt() {
        return nomeProt;
    }

    public void setNomeProt(String nomeProt) {
        this.nomeProt = nomeProt;
    }

    public String getUserProt() {
        return userProt;
    }

    public void setUserProt(String userProt) {
        this.userProt = userProt;
    }

    public String getPasswordProt() {
        return passwordProt;
    }

    public void setPasswordProt(String passwordProt) {
        this.passwordProt = passwordProt;
    }

    public boolean isThing(DefaultMutableTreeNode aoTreeNode){
        if(aoTreeNode.getUserObject().toString().contains("<<Thing>>"))
            return true;
        return false;
    }

    public boolean isComponent(DefaultMutableTreeNode aoTreeNode){
        if(aoTreeNode.getUserObject().toString().contains("<Componnent>>"))
            return true;
        return false;
    }

    public boolean isProtocol(DefaultMutableTreeNode aoTreeNode){
        if(aoTreeNode.getUserObject().toString().contains("<<Protocol>>"))
            return true;
        return false;
    }

    public boolean isServer(DefaultMutableTreeNode aoTreeNode){
        if(aoTreeNode.getUserObject().toString().contains("<<Server>>"))
            return true;
        return false;
    }

    
    public boolean isProject(DefaultMutableTreeNode aoTreeNode){
        if(aoTreeNode.getUserObject().toString().contains("<<Project>>"))
            return true;
        return false;
    }
    
    public Project(){}  
}
